Skip to content

Conversation

@xterao
Copy link
Collaborator

@xterao xterao commented Apr 21, 2025

Added jump-to-DAO and SQL‑file functionality within JARs.

Enabled gutter icons and jump actions in both the binary JAR and its corresponding source JAR.
(The source JAR must be linked to the binary JAR.)

@xterao xterao added the enhancement New feature or request label Apr 21, 2025
@xterao xterao added this to the 0.6.0 Release milestone Apr 21, 2025
@xterao xterao requested a review from Copilot April 21, 2025 01:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@xterao xterao requested a review from Copilot April 21, 2025 05:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements jump-to-DAO and SQL‑file functionality for both binary and source JARs, enabling gutter icons and jump actions in the IDE. Key changes include updating the DAO method lookup in SqlLineMakerProvider and PsiDaoMethod to handle JAR-contained files, enhancing DAO resolution in DaoMethodUtil for both module and JAR sources, and adding new utilities for JAR file search and file type checks.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main/kotlin/org/domaframework/doma/intellij/gutter/sql/SqlLineMakerProvider.kt Updates the method call to include the DAO file context when looking up DAO methods.
src/main/kotlin/org/domaframework/doma/intellij/extension/expr/SqlElExtensions.kt Removes an unused import.
src/main/kotlin/org/domaframework/doma/intellij/common/psi/PsiDaoMethod.kt Enhances daoFile resolution and adds jar path handling for SQL file path determination.
src/main/kotlin/org/domaframework/doma/intellij/common/dao/DaoMethodUtil.kt Refactors findDaoMethod to accept an optional DAO file and introduces getDaoClassName for class name extraction.
src/main/kotlin/org/domaframework/doma/intellij/common/JarFileSearch.kt Introduces utility functions to locate the JAR root and resolve file paths within JARs.
src/main/kotlin/org/domaframework/doma/intellij/common/FileTypeCheck.kt Adds support for “CLASS” file types in both the file extension mapping and file type checks.
Comments suppressed due to low confidence (1)

src/main/kotlin/org/domaframework/doma/intellij/common/dao/DaoMethodUtil.kt:115

  • [nitpick] Consider defining a constant for the literal "dao/" used in getDaoClassName to make the directory structure assumption explicit and improve maintainability.
private fun getDaoClassName(

@xterao xterao merged commit 06d5a7c into main Apr 21, 2025
5 checks passed
@xterao xterao deleted the feature/file-jump-in-jar branch April 21, 2025 05:23
@xterao xterao linked an issue Apr 21, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException in DeCompiled jar

2 participants